/**
 * @file presets.js
 * @description 游戏板子预设配置
 */

import { ROLES } from './constants.js';

/**
 * 游戏板子预设
 */
export const GAME_PRESETS = {
    'default': {
        name: '默认板子 (6-12人)',
        playerCount: { min: 3, max: 12 },
        roles: null, // null 表示使用动态角色分配
        description: '根据玩家人数自动平衡角色配置'
    },
    '屠边局': {
        name: '经典屠边局 (9人)',
        playerCount: { min: 9, max: 9 },
        roles: {
            [ROLES.WEREWOLF]: 3,
            [ROLES.SEER]: 1,
            [ROLES.WITCH]: 1,
            [ROLES.HUNTER]: 1,
            [ROLES.VILLAGER]: 3
        },
        description: '经典9人局，考验逻辑推理能力'
    },
    '预女猎白': {
        name: '预女猎白 (12人)',
        playerCount: { min: 12, max: 12 },
        roles: {
            [ROLES.WEREWOLF]: 4,
            [ROLES.SEER]: 1,
            [ROLES.WITCH]: 1,
            [ROLES.HUNTER]: 1,
            [ROLES.IDIOT]: 1,
            [ROLES.VILLAGER]: 4
        },
        description: '标准12人局，白痴增加容错率'
    },
    '预女猎守': {
        name: '预女猎守 (12人)',
        playerCount: { min: 12, max: 12 },
        roles: {
            [ROLES.WEREWOLF]: 4,
            [ROLES.SEER]: 1,
            [ROLES.WITCH]: 1,
            [ROLES.HUNTER]: 1,
            [ROLES.GUARD]: 1,
            [ROLES.VILLAGER]: 4
        },
        description: '进阶12人局，守卫增强好人阵营'
    },
    '狼王局': {
        name: '狼王局 (10人)',
        playerCount: { min: 10, max: 10 },
        roles: {
            [ROLES.WEREWOLF]: 2,
            [ROLES.WOLF_KING]: 1,
            [ROLES.SEER]: 1,
            [ROLES.WITCH]: 1,
            [ROLES.HUNTER]: 1,
            [ROLES.GUARD]: 1,
            [ROLES.VILLAGER]: 3
        },
        description: '狼王带来更多变数，高手局推荐'
    },
    '白狼王局': {
        name: '白狼王局 (12人)',
        playerCount: { min: 12, max: 12 },
        roles: {
            [ROLES.WEREWOLF]: 2,
            [ROLES.WOLF_KING]: 1,
            [ROLES.WHITE_WOLF_KING]: 1,
            [ROLES.SEER]: 1,
            [ROLES.WITCH]: 1,
            [ROLES.HUNTER]: 1,
            [ROLES.GUARD]: 1,
            [ROLES.VILLAGER]: 4
        },
        description: '白狼王自爆机制，节奏紧张刺激'
    },
    '预女守白': {
        name: '预女守白 (12人)',
        playerCount: { min: 12, max: 12 },
        roles: {
            [ROLES.WEREWOLF]: 4,
            [ROLES.SEER]: 1,
            [ROLES.WITCH]: 1,
            [ROLES.GUARD]: 1,
            [ROLES.IDIOT]: 1,
            [ROLES.VILLAGER]: 4
        },
        description: '四神配合，防守能力强'
    }
};

/**
 * 角色人数分配配置
 */
export const DISTRIBUTION_CONFIG = {
    3: { werewolf: 1, god: 1, villager: 1 },
    4: { werewolf: 1, god: 1, villager: 2 },
    5: { werewolf: 1, god: 1, villager: 3 },
    6: { werewolf: 2, god: 2, villager: 2 },
    7: { werewolf: 2, god: 2, villager: 3 },
    8: { werewolf: 3, god: 3, villager: 2 },
    9: { werewolf: 3, god: 3, villager: 3 },
    10: { werewolf: 3, god: 3, villager: 4 },
    11: { werewolf: 4, god: 4, villager: 3 },
    12: { werewolf: 4, god: 4, villager: 4 },
    13: { werewolf: 4, god: 4, villager: 5 },
    14: { werewolf: 5, god: 5, villager: 4 },
    15: { werewolf: 5, god: 5, villager: 5 },
    18: { werewolf: 6, god: 6, villager: 6 },
};

/**
 * 支持的玩家人数
 */
export const VALID_PLAYER_COUNTS = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18];

